{% for message in get_flashed_messages(category_filter=['success']) %}
    <div class="alert alert-success alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <strong>Success!</strong> {{ message }}
    </div>
{%  endfor %}
{% for message in get_flashed_messages(category_filter=['error']) %}
    <div class="alert alert-warning alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <strong>Error!</strong> {{ message }}
    </div>
{%  endfor %}